package com.luo.pojo.blog;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Pro Luo
 * @since 2020-08-05
 *    示例实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
//@ApiModel(value="BlogCommentReply对象", description="")
public class BlogCommentReply implements Serializable {

    private static final long serialVersionUID = 1L;

//    @ApiModelProperty(value = "博客回复id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

//    @ApiModelProperty(value = "回复内容")
    private String content;

//    @ApiModelProperty(value = "点赞数")
    @TableField(update = "%s+1")
    private Integer likeNum;

//    @ApiModelProperty(value = "回复评论的id")
    @TableField("blog_commentId")
    private Integer blogCommentid;

//    @ApiModelProperty(value = "回复用户的头像")
    private String userAvatar;

//    @ApiModelProperty(value = "回复用户的名字")
    private String userName;

//    @ApiModelProperty(value = "回复用户的名字")
    private String replyName;

//    @ApiModelProperty(value = "回复时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Override
    public String toString() {
        return
                "回复用户名:   " + userName + '\n' +
                "回复用头像:   " + userAvatar + '\n' +
                "回复点赞人数:   " + likeNum + '\n' +
                "回复的用户名:   " + replyName + '\n'+
                "回复时间:   " + createTime + '\n' +
                "回复评论id"  + blogCommentid + '\n' +
                "回复内容:   " + "\n" + "\t" + content + '\n';
    }
}
